<template>
	<view class="content1 display  displayColumn M-T30">
		<view class="ones M-T24 display  width-100 ">
			<span class="fontSize font_comm M-L24">{{item.stationName}}</span>
		</view>
		<view class="twos display  M-T16">
			<view class="twos_one display  all_item">
				<img class="img1" src="@/static/img/car-manage.png" alt="" />
			</view>
			<view class="twos_two display  displayColumn">
				<span class="fontSize font_comm">{{item.goodsName}}</span>
				<span class=" fontSize font_comm" v-if="item.artificialServiceType == 1">预约师傅：{{item.workerName}}</span>
				<span class="fontSize font_comm">预约时间：{{item.createTime}}</span>
			</view>
			<view class="twos_three display  displayColumn">
				<span class="fontSize font_comm">￥{{item.washOrderAmount}}</span>
				<!-- <span class="fontSize font_comm">×1</span> -->
			</view>
		</view>
		<!-- 分割线 -->
		<view class="wodes_linss M-L24 M-T20">
			
		</view>
		<view class="bottom_all display  width-100 M-T20">
			<button v-if="item.washOrderStatus == 0" :disabled="item.washOrderStatus > 0" class="fontSize font_comm display all_item" @click.stop="hexiao">核销订单</button>
			<button v-if="item.washOrderStatus == 1" class="fontSize font_comm display all_item">已核销</button>
			<button v-if="item.washOrderStatus == 2" class="fontSize font_comm display all_item">已取消</button>
		</view>
		<u-popup :show="show" mode="center" :round="40" :safeAreaInsetBottom="false">
		            <view class="popupall display  displayColumn">
		                <view class="popup_one1 display  width-100 all_item M-T60">
		                <span class="fontSize font_comm">核销提醒</span>
		                </view>
						<view class="popup_one2 display  width-100 all_item M-T30">
							<span class="fontSize font_comm">请仔细确认订单后核销</span>
						</view>
						<view class="popup_one3 display  width-100 all_item M-T60">
							<button class="fontSize font_comm display all_item" @click="cancle">取消</button>
							<button class="fontSize font_comm display all_item" @click="submit(item.reservationCode)">确定</button>
						</view>
		            </view>
				</u-popup>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				show:false
			}
		},
		props:{
			item:Object
		},
		methods:{
			// 核销订单
			hexiao(){
				this.show = true;
			},
			cancle(){
				this.show = false;
				
			},
			submit(id){
				this.$modal.loading('正在加载')
				this.$req.get(`/xcx/orderReservation/verify/code/${id}`).then(res=>{
					console.log(res)
					this.$modal.closeLoading()
					if(res.data.code==200){
						this.$modal.msg('操作成功')
						this.$emit("backHome");  
						
					}else{
						this.$modal.msg(res.data.msg)
					}
					
				})
				this.show = false;
				
			}
		}
	}
</script>

<style scoped lang="scss">
	.content1{
		width: 690rpx;
		height: 324rpx;
		background: #FFFFFF;
		border-radius: 24rpx 24rpx 24rpx 24rpx;	
	}
	.ones{
		justify-content: flex-start;
		span{
			font-weight: 600;
			font-size: 24rpx;
			color: #212121;
		}
	}
	.twos{
		width: 100%;
		height: 132rpx;
		.twos_one{
			flex: 2;
			margin-left: 20rpx;
		}
		.twos_two{
			margin-left: 8rpx;
			align-items: flex-start;
			flex: 6;
			justify-content: space-around;
			:nth-child(1){
				font-weight: 600;
				font-size: 28rpx;
				color: #000000;
			}
			:nth-child(2){
				font-weight: 400;
				font-size: 24rpx;
				color: #72778A;
			}
			:nth-child(3){
				font-weight: 400;
				font-size: 24rpx;
				color: #72778A;
			}
		}
		.twos_three{
			align-items: flex-end;
			flex: 1;
			justify-content: space-between;
			margin-right: 24rpx;
			:nth-child(1){
				margin-top: 15rpx;
				font-weight: 600;
				font-size: 24rpx;
				color: #FF672D;
			}
			:nth-child(2){
				font-weight: 400;
				font-size: 24rpx;
				color: #72778A;
				margin-bottom: 10rpx;
			}
		}
	}
	.img1{
		width: 132rpx;
		height: 132rpx;
		border-radius: 12rpx 12rpx 12rpx 12rpx;
	}
	.wodes_linss{
		width: 640rpx;
		height: 0rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		border: 2rpx solid #F6F6F6;
	}
	.bottom_all{
		justify-content: flex-end;
		min-height: 54rpx;
		button{
			width: 136rpx;
			height: 54rpx;
			background: #126BC9;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			font-weight: 600;
			font-size: 24rpx;
			color: #FFFFFF;
			white-space:nowrap;
			margin-right: 24rpx;
		}
	}
	.popupall{
		width: 630rpx;
		height: 346rpx;
		background: #FFFFFF;
		border-radius: 40rpx 40rpx 40rpx 40rpx;
		.popup_one1{
			span{
				font-weight: 600;
				font-size: 32rpx;
				color: #000000;
			}
		}
		.popup_one2{
			font-weight: 400;
			font-size: 28rpx;
			color: #7D7D7D;
		}
		.popup_one3{
		
			:nth-child(1){
				width: 220rpx;
				height: 72rpx;
				background: rgba(18,107,201,0.1);
				border-radius: 16rpx 16rpx 16rpx 16rpx;
				font-weight: 400;
				font-size: 28rpx;
				color: #126BC9;
			}
			:nth-child(2){
				width: 220rpx;
				height: 72rpx;
				background: #126BC9;
				
				font-weight: 600;
				font-size: 28rpx;
				color: #FFFFFF;
			}
		}
	}
</style>